//
//  MyAdsViewController.m
//  project
//
//  Created by Apple on 2017/11/7.
//  Copyright © 2017年 Macmini. All rights reserved.
//

#import "MyAdsViewController.h"
#import "UIStoryboard+load.h"
#import "CLSegmentView.h"
#import "JRSegmentControl.h"
#import "JRSegmentViewController.h"
#import "WorkingTableViewController.h"
#import "SoldoutTableViewController.h"
@interface MyAdsViewController ()

@property (nonatomic, strong) CLSegmentView * CLSegView;
@property(nonatomic,strong)WorkingTableViewController *vcOne;

@property(nonatomic,strong)SoldoutTableViewController *vcTwo;
@end

@implementation MyAdsViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    JRSegmentViewController *vc = [self pushToShopingVCmodel];
    [self.view addSubview:vc.view];
    [self addChildViewController:vc];
    self.navigationItem.titleView = vc.segment;
    // Do any additional setup after loading the view.
}
- (JRSegmentViewController *)pushToShopingVCmodel {
//    CLMyBTCAddressVc *Second = [UIStoryboard loadStoryboard:@"CLMyBTCAddressVc"];
//    Second.btc_eth = 1;
//    CLMyBTCAddressVc *Third = [UIStoryboard loadStoryboard:@"CLMyBTCAddressVc"];
//    Third.btc_eth = 2;
    JRSegmentViewController *vc = [[JRSegmentViewController alloc] init];
    vc.segmentBgColor = [UIColor clearColor];
    //            vc.segmentBgColor = [UIColor redColor];
    vc.indicatorViewColor = [UIColor blackColor];
    vc.titleColor = [UIColor darkGrayColor];
    vc.automaticallyAdjustsScrollViewInsets = YES;
    [vc setViewControllers:@[self.vcOne, self.vcTwo]];
    [vc setTitles:@[@"进行中",@"已下架"]];
    return vc;
}

- (WorkingTableViewController *)vcOne {
    
    if (!_vcOne) {
        _vcOne = [WorkingTableViewController new];
    }
    return _vcOne;
}

- (SoldoutTableViewController *)vcTwo {
    
    if (!_vcTwo) {
        _vcTwo = [SoldoutTableViewController new];
    }
    return _vcTwo;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
